package com.java1234.jxc.service.impl;

import com.java1234.jxc.beans.SysUser;
import com.java1234.jxc.core.base.BaseServiceImpl;
import com.java1234.jxc.service.UserService;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2018/3/17.
 */
@Service
public class UserServiceImpl extends BaseServiceImpl<SysUser> implements UserService{

   /* @Autowired
    private Dao dao;*/

    @Autowired
    public UserServiceImpl(Dao dao) {
        super(dao);
    }

    @Override
    public SysUser findByUserName(String userName) {

        SysUser user = this.fetch(Cnd.where("userName", "=", userName));


        return user;
    }
}
